using System.Windows;
using CommunityToolkit.Mvvm.ComponentModel;
using HandyControlUIDemo.UserControl;

namespace HandyControlUIDemo.Windows;

public partial class ButtonWindowViewModel: ObservableObject
{
    [ObservableProperty]
    private bool isWarning;

  
}

public partial class ButtonWindow : Window
{
    public ButtonWindowViewModel Vm { get; } = new();
    public ButtonWindow()
    {
        InitializeComponent();
        DataContext = Vm;
        Loaded += current_Loaded;
    }

    private void current_Loaded(object sender, RoutedEventArgs e)
    {
        ContentControl.Content = new UserControl1();
    }

    private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
    {   
       // ContentControl.Content = new UserControl1();
       // Vm.IsWarning = !Vm.IsWarning;
    }
}